//
//  GFTextRestrict.h
//  qmtest
//
//  Created by 岳云石 on 2017/3/24.
//  Copyright © 2017年 岳云石. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef BOOL(^GFStringFilter)(NSString * targetString);

typedef NS_ENUM(NSInteger, GFRestrictType)
{
    GFRestrictTypeOnlyNumber = 1 << 0,      ///< 只允许输入数字
    GFRestrictTypeOnlyDecimal = 1 << 1,     ///<  只允许输数字.
};

#import <Foundation/Foundation.h>

@interface GFTextRestrict : NSObject

@property (nonatomic, assign) NSUInteger maxLength;

+ (instancetype)textRestrictWithRestrictType: (GFRestrictType)restrictType;
- (void)textDidChanged: (UITextField *)textField;
- (BOOL)MatchStringFormat:(NSString *)targetString  MatchFormat:(NSString *)matchFormat;
@end
